<? defined('_JEXEC') or die; ?>
<? @style(@mediaurl.'/com_bib/css/bib.css'); ?>
<form action="<?= @route('index.php?option=com_bib&view=books')?>" method="post" name="adminForm">

	<table class="adminlist" width="100%">
		<thead>
			<tr>
				<th>
					<?= @helper('grid.sort', 'Title', 'title', @$state->direction, @$state->order); ?>
				</th>
				<th>
					<?= @helper('grid.sort', 'Author', 'author', @$state->direction, @$state->order); ?>
				</th>
				<th>
					<?= @helper('grid.sort', 'Genre', 'genre', @$state->direction, @$state->order); ?>
				</th>
			</tr>
		</thead>
		<tbody>
			<? $i = 0; $m = 0; ?>
			<? foreach (@$books as $book) : ?>
			<tr class="<?php echo 'row'.$m; ?>">
				<td>
					<a href="<?=@route('view=book&id='.$book->id)?>">
						<?= $book->title; ?>
					</a>
				</td>
				<td>
					<?= $book->author; ?>
				</td>	
				<td>
					<?= $book->genre; ?>
				</td>		
			</tr>
			<? $i = $i + 1; $m = (1 - $m); ?>
			<? endforeach; ?>

			<? if (!count(@$books)) : ?>
			<tr>
				<td colspan="8" align="center">
					<?= @text('No items found'); ?>
				</td>
			</tr>
			<? endif; ?>
		</tbody>
		<tfoot>
			<tr>
				<td colspan="20">
					<?= @helper('admin::com.bib.helper.paginator.pagination', @$total, @$state->offset, @$state->limit) ?>
			
				</td>
			</tr>
		</tfoot>
	</table>
	<input type="hidden" name="boxchecked" value="0" />
</form>